<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Command Line Options</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css"><!--
td {
	vertical-align:top;
}
--></style>
</head>

<body>

<p>The database mode, encryption type and password can also be specified from the command line. This lets you create a shortcut to a database on a removable or portable drive which can be opened automatically.</p>

<h2>Arguments</h2>
<table summary="Command line arguments" class="wikitable">
    <thead>
      <tr>
          <th class="centered">Argument</th>
          <th>Meaning</th>
          <th>Required</th>
          <th>Example</th>
      </tr>
    </thead>
    <tr>
        <td class="centered">db</td>
        <td>Database path.</td>
        <td>No, but if omitted all other required database attributes (hostname, username, databasename) must be specified.</td>
        <td>
          <ul class="plain">
            <li>-db=E:\lockcrypt.lce</li>
            <li>-db="E:\path with spaces\lockcrypt.lce"</li>
          </ul>
        </td>
    </tr>
    <tr>
        <td class="centered"><em>dbhost</em></td>
        <td>Database Hostname</td>
        <td>No</td>
        <td>
          <ul class="plain">
            <li>-dbhost=192.168.2.15</li>
            <li>-dbhost=lime49.com</li>
            <li>-dbhost=pegasus</li>
          </ul>
        </td>
    </tr>
    <tr>
        <td class="centered"><em>dbport</em></td>
        <td>Database Port Number</td>
        <td>No</td>
        <td>
          <ul class="plain">
            <li>-dbport=3306</li>
          </ul>
        </td>
    </tr>
    <tr>
        <td class="centered"><em>dbuser</em></td>
        <td>Database Username</td>
        <td>No</td>
        <td>
          <ul class="plain">
            <li>-dbuser=spike</li>
          </ul>
        </td>
    </tr>
    <tr>
        <td class="centered"><em>dbpass</em></td>
        <td>Database Password</td>
        <td>No</td>
        <td>
          <ul class="plain">
            <li>-dbpass=P@55word</li>
          </ul>
        </td>
    </tr>
    <tr>
        <td class="centered"><em>dbdatabase</em></td>
        <td>Database Name</td>
        <td>No</td>
        <td>
          <ul class="plain">
            <li>-dbdatabase=lockcrypt</li>
          </ul>
        </td>
    </tr>

    <tr>
        <td class="centered"><em>mode</em> or <em>m</em></td>
        <td>Database mode</td>
        <td><span>No, but if present must be one of:</span>
          <ul class="plain">
            <li>xml</li>
            <li>sqlite</li>
            <li>mysql</li>
            <li>legacy</li>
          </ul>
        </td>
        <td>
          <ul class="plain">
            <li>-m=xml</li>
            <li>-mode=sqlite</li>
          </ul>
        </td>
    </tr>
    <tr>
        <td class="centered"><em>encryption</em> or <em>e</em></td>
        <td>Encryption Algorithm</td>
        <td><span>No, but if present must be one of:</span>
          <ul class="plain">
            <li>none</li>
            <li>aes256</li>
            <li>twofish256</li>
          </ul>
        </td>
        <td>
          <ul class="plain">
            <li>-e=aes256</li>
            <li>-encryption=none</li>
          </ul>
        </td>
    </tr>
    <tr>
        <td class="centered"><em>pw</em></td>
        <td>Password</td>
        <td>No</td>
        <td>
          <ul class="plain">
            <li>-pw=guessme</li>
          </ul>
        </td>
    </tr>
    <tr>
        <td class="centered"><em>?</em></td>
        <td>Show help</td>
        <td>No</td>
        <td></td>
    </tr>
</table>
<p>Arguments are not case sensitive, and can be specified by either a dash (<em>-db=myfile.lce</em>) or a slash (<em>/db=myfile.lce</em>).</p>

<p>If only a path is specified, LockCrypt will try to detect the filetype and try each encryption algorithm, assuming a blank password.</p>
<p>If only one argument is specified, it is assumed to be a path to a path to a <a href="Account.Databases.html#descriptors">database descriptor file</a>.</p>

<h2>Examples</h2>
<ul>
  <li>lockcrypt.exe -db="C:\LockCrypt\xml\aes-noencryption.lce"</li>
  <li>lockcrypt.exe -db="C:\LockCrypt\xml\noencryption.xml" -m=xml</li>
  <li>lockcrypt.exe -db="C:\LockCrypt\xml\aes-aes-nopassword.lce" -mode=xml -encryption=aes256</li>
  <li>lockcrypt.exe -db="C:\LockCrypt\sqlite\sqlite-aes-passwordapple3.db3" -mode=sqlite -e=aes256 -pw=apple</li>
  <li>lockcrypt.exe -db="C:\LockCrypt\sqlite\sqlite-noencryption.db3" -mode=sqlite -e=none</li>
</ul>

</body>
</html>
